#include "comm.hpp"

int main()
{
    key_t key = GetKey();
    //sleep(3);

    int shmid = GetShm(key);
    //sleep(3);

    char *s = (char *)shmat(shmid, nullptr, 0);
    //sleep(3);

    int fd = open(filename,O_WRONLY);

    char ch = 'a';
    int cnt = 1;
    for (; ch <= 'z'; ch++)
    {
        write(fd,&cnt,sizeof(cnt));
        cnt++;
        s[ch - 'a'] = ch;
        cout << "read : " << ch <<endl;
        sleep(6);
    }

    return 0;
}